<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="Step 3: (Optional) Modifying the dbagent.ini Backup File">
<meta name="product" content="">
<meta name="DC.Relation" scheme="URI" content="en-us_topic_0000002200155325.html">
<meta name="prodname" content="">
<meta name="version" content="">
<meta name="brand" content="">
<meta name="DC.Publisher" content="20250306">
<meta name="prodname" content="csbs">
<meta name="documenttype" content="usermanual">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="EN-US_TOPIC_0000002195649998">
<meta name="DC.Language" content="en-us">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>Step 3: (Optional) Modifying the dbagent.ini Backup File</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="EN-US_TOPIC_0000002195649998"></a><a name="EN-US_TOPIC_0000002195649998"></a>

<h1 class="topictitle1">Step 3: (Optional) Modifying the dbagent.ini Backup File</h1>
<div><p>This section describes how to optimize backup replication and compression threads to improve the product performance. The operation must be performed on all data nodes.</p>
<div class="section"><h4 class="sectiontitle">Precautions</h4><p>You are advised to perform a stairstep test. That is, increase the values of <strong>backup_copy_theads</strong> and <strong>compress</strong> by <strong>2</strong>, <strong>4</strong>, <strong>8</strong>, and <strong>16</strong>, and record the CPU, memory, I/O, and compression time.</p>
<ul><li>If the value of <strong>backup_copy_theads</strong> increases improperly, I/O contention may occur, affecting the normal running of the database. (If the maximum I/O throughput of the disk is 500 MB/s and <strong>backup_copy_threads</strong> is set to <strong>8</strong>, the xtrabackup tool attempts to consume 800 MB/s. In this case, the backup rate may be limited and the 8-thread capability cannot be fully used. In addition, the I/O operations of other applications on the host may decrease, and the query latency may increase by 2 to 5 times.)</li><li>If the value of <strong>compress</strong> increases improperly, the following problems may occur:<ul><li>Resource competition is intensified. (If the CPU scheduling overhead increases by 5-15%, the memory pressure may cause swap, resulting in a latency increase of more than 50%.)</li><li>I/O bottleneck: The compression speed cannot be linearly increased due to I/O overload (for example, the speed is increased by only 30% when the number of threads is doubled). In addition, long latency may affect other disk-dependent services (for example, the database response time increases by 20%).</li></ul>
</li></ul>
</div>
<div class="section"><h4 class="sectiontitle">Procedure</h4><ol><li><span>Use PuTTY to log in to the host of a data node as user <strong>root</strong>.</span></li><li><span>Run the <strong>vim </strong><em>Root directory of the data node user</em><strong>/etc/dbagent.ini</strong> command to open the <strong>dbagent.ini</strong> file.</span><p><div class="p">Example:<pre class="screen">vim /home/goldendb/zxdb1/etc/dbagent.ini</pre>
</div>
</p></li><li><span>Modify the parameters of the backup replication and compression threads.</span><p><pre class="screen">backup_copy_threads = <em>Backup replication thread</em>
compress = <em>Number of compression threads</em></pre>
<div class="note"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p>The number of backup replication threads and that of compression threads are specified in a range from 1 to 32 based on the devices. Generally, they are specified in a range from 4 to 8.</p>
</div></div>
</p></li><li><span>Press <strong>Esc</strong>. Run the <strong>:wq!</strong> command to save the modifications and exit.</span></li><li><span>Switch to the user of the data node and run the following command to reload the <strong>dbagent.ini</strong> file:</span><p><pre class="screen">dbtool -dbagent -lc</pre>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0000002200155325.html">Backing Up a GoldenDB Database</a></div>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">Copyright &copy; Huawei Technologies Co., Ltd.</div></body>
</html>